package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchDeviceMonitorMapper;
import com.ruoyi.system.domain.DispatchDeviceMonitor;
import com.ruoyi.system.service.IDispatchDeviceMonitorService;

/**
 * 设备监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchDeviceMonitorServiceImpl implements IDispatchDeviceMonitorService 
{
    @Autowired
    private DispatchDeviceMonitorMapper dispatchDeviceMonitorMapper;

    /**
     * 查询设备监控
     * 
     * @param deviceMonitorId 设备监控主键
     * @return 设备监控
     */
    @Override
    public DispatchDeviceMonitor selectDispatchDeviceMonitorByDeviceMonitorId(Long deviceMonitorId)
    {
        return dispatchDeviceMonitorMapper.selectDispatchDeviceMonitorByDeviceMonitorId(deviceMonitorId);
    }

    /**
     * 查询设备监控列表
     * 
     * @param dispatchDeviceMonitor 设备监控
     * @return 设备监控
     */
    @Override
    public List<DispatchDeviceMonitor> selectDispatchDeviceMonitorList(DispatchDeviceMonitor dispatchDeviceMonitor)
    {
        return dispatchDeviceMonitorMapper.selectDispatchDeviceMonitorList(dispatchDeviceMonitor);
    }

    /**
     * 新增设备监控
     * 
     * @param dispatchDeviceMonitor 设备监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchDeviceMonitor(DispatchDeviceMonitor dispatchDeviceMonitor)
    {
        return dispatchDeviceMonitorMapper.insertDispatchDeviceMonitor(dispatchDeviceMonitor);
    }

    /**
     * 修改设备监控
     * 
     * @param dispatchDeviceMonitor 设备监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchDeviceMonitor(DispatchDeviceMonitor dispatchDeviceMonitor)
    {
        return dispatchDeviceMonitorMapper.updateDispatchDeviceMonitor(dispatchDeviceMonitor);
    }

    /**
     * 批量删除设备监控
     * 
     * @param deviceMonitorIds 需要删除的设备监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDeviceMonitorByDeviceMonitorIds(Long[] deviceMonitorIds)
    {
        return dispatchDeviceMonitorMapper.deleteDispatchDeviceMonitorByDeviceMonitorIds(deviceMonitorIds);
    }

    /**
     * 删除设备监控信息
     * 
     * @param deviceMonitorId 设备监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDeviceMonitorByDeviceMonitorId(Long deviceMonitorId)
    {
        return dispatchDeviceMonitorMapper.deleteDispatchDeviceMonitorByDeviceMonitorId(deviceMonitorId);
    }
}
